package com.blog.service.imp;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blog.dao.sys.MenuDao;
import com.blog.entity.sys.Menu;
import com.blog.service.sys.MenuService;
 

@Service
public class MenuServiceImp implements MenuService {

		@Autowired
		private MenuDao dao;

		@Override
		public List<Menu> listMenu(Integer roleId) {
			return dao.listMenu(roleId);
		}

		@Override
		public List<Menu> listMenuRole(Integer pid, Integer roleId) {
			return dao.listMenuRole(pid, roleId);
		}

		@Override
		public List<Menu> listAllMenu(Map<String, Object> prams) {
			return dao.listAllMenu(prams);
		}

		@Override
		public Menu getMenuById(Integer menuId) {
			return dao.getMenuById(menuId);
		}

		@Override
		public Integer saveMenu(Menu m) {
			 //如果要完善 验证  TODO
			return dao.saveMenu(m);
		}

		@Override
		public Integer updateMenu(Menu m) {
		 
			return dao.updateMenu(m);
		}

		@Override
		public Integer delectMenuById(Integer menuId) {
			return dao.delectMenuById(menuId);
		}
		
		
}
